<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link href="/css/shop.css" type="text/css" rel="stylesheet" />
<link href="/css/Sellerber.css" type="text/css"  rel="stylesheet" />
<link href="/css/bkg_ui.css" type="text/css"  rel="stylesheet" />
<link href="/font/css/font-awesome.min.css"  rel="stylesheet" type="text/css" />
<script src="/js/jquery-1.9.1.min.js" type="text/javascript" ></script>
<script src="/js/Sellerber.js" type="text/javascript"></script>
<script type="text/javascript" src="/js/jquery.cookie.js"></script>
<script src="/js/shopFrame.js" type="text/javascript"></script>
<script src="/js/jquery.dataTables.min.js"></script>
<script src="/js/jquery.dataTables.bootstrap.js"></script>
<script src="/js/layer/layer.js" type="text/javascript"></script>
<script src="/js/laydate/laydate.js" type="text/javascript"></script>
<!--[if lt IE 9]>
<script src="/js/html5shiv.js" type="text/javascript"></script>
<script src="/js/respond.min.js"></script>
<script src="/js/css3-mediaqueries.js"  type="text/javascript"></script>
  <![endif]-->
<title>订单</title>

</head>
<body>
<div class="margin order_style" id="page_style">
<div class="sum_style margin-bottom ">
</div>
<div class="status_order margin-bottom">
  <a href="javascrpit:void" class="btn button_btn btn-info status_btn">订单总数(454)</a>
  <a href="javascrpit:void" class="btn button_btn btn-info status_btn">今日订单(111)</a>
  <a href="javascrpit:void" class="btn button_btn btn-info status_btn">未完成(454)</a>
 </div>
<div class="operation clearfix">
<button class="btn button_btn btn-info" type="button" onclick=""><i class="fa  fa-th-list"></i>&nbsp;订单列表</button> 
<div class="search  clearfix">
 <label class="label_name">订单号：</label>
 <input name="" type="text"  class="form-control col-xs-6" style=" width:250px;"/>
  <label class="label_name">下单时间：</label>
  <input class="inline laydate-icon " id="start" type="text"  style=" margin-right:10px; height:auto; float:left; width:150px;" />
 <button class="btn button_btn bg-deep-blue " onclick=""  type="button"><i class="fa  fa-search"></i>&nbsp;搜索</button>
</div>
</div>
<div class="List_display">
 
  <table class="table table_list table_striped table-bordered" id="sample-table">
  <thead>
  <tr>
   <th width="80">订单编号</th>   
   <th width="80">用户姓名</th>
   <th width="100">用户手机</th>
   <th width="200">用户地址</th>
   <th width="100">订单总金额</th>
   <th width="150">下单时间</th>
   <th width="150">支付时间(状态)</th>
   <th width="150">操作</th>
   </tr>   
  </thead>
  <tbody>
  <#list orderDTOList as order>
   <tr>
   		<td>${order.orderId}</td>
   		<td>${order.buyerName}</td>
   		<td>${order.buyerPhone}</td>
   		<td>${order.buyerAddress}</td>
   		<td>￥${order.orderAmount}</td>
   		<td>${order.createTime}</td>
   		<#if order.getOrderStatusEnum().code == 1>
   			<td>${order.payTime}</td>
   		<#else>
   			<td>${order.getOrderStatusEnum().msg}</td>
   		</#if>
   		<td>
   		<a href="javascript:void(0)" onclick="cancel(this,${order.orderId})" class="btn btn-danger operation_btn">删除</a>
		<a href="javascript:void(0)" onclick="OrderDetail(this,${order.orderId})" class="btn bg-deep-blue operation_btn">详情</a>
		
		</td>
   </tr>
  </#list>
  
  </tbody>
 </table>
</div>
<ul class="pagination pull-right">
	<#if currentpage lte 1>
		<li class="disabled"><a href="#">上一页</a></li>
	<#else>
		<li><a href="#">上一页</a></li>
	</#if>
	<#list 1..totalPages as index>
	<#if currentpage == index>
	<li class="disabled"><a href="#">${index}</a></li>
	<#else>
	<li><a href="/backstage/order/list?page=${index}&size=${size}">${index}</a></li>
	</#if>
	</#list>
	<#if currentpage gte totalPages>
		<li class="disabled"><a href="#">下一页</a></li>
	<#else>
		<li><a href="/backstage/order/list?page=${currentpage + 1}&size=${size}">下一页</a></li>
	</#if>
</ul>
</div>
</body>
</html>
<script>


	/*产品-删除*/
function cancel(obj,id){
	layer.confirm('确认要取消订单吗？',{icon:0,},function(index){
		$(obj).parents("tr").remove();
		layer.msg('已删除!',{icon:1,time:1000});
	});
}
	
/******************/
 function OrderDetail(obj,id){
	
	//关于layer样式:
	/* http://www.layui.com/doc/modules/layer.html */
	 layer.open({
		  type: 2,
		  title: '订单明细表',
		  shadeClose: true,
	      shade: [0.8],
	      maxmin: true, 
	      closeBtn: 1, 
		  area: ['1100px', '500px'],
		  anim: 0,
		  content: ['/backstage/order/detailoforder?orderid='+id] //iframe的url，no代表不显示滚动条
		});
}

/*******滚动条*******/
$("body").niceScroll({  
	cursorcolor:"#888888",  
	cursoropacitymax:1,  
	touchbehavior:false,  
	cursorwidth:"5px",  
	cursorborder:"0",  
	cursorborderradius:"5px"  
});
	/*时间*/
	laydate({
    elem: '#start',
    event: 'focus' 
});
	

</script>
